package com.foreknow.oppExer1.exer9;

/**
 * @author shkstart
 * @create 2021-07-28 14:54
 */
public class Company implements Money {
    @Override
    public void salary(Employee e1, Manager m1) {
        e1.setSalary(6000);
        m1.setSalary(8000);
        m1.setBonus(500);
    }

    public static void main(String[] args) {
        Company company = new Company();

        Manager m1 = new Manager("小明", 0);
        Employee e1 = new Employee("小亮", 0);
        System.out.println(m1.getName());

        company.salary(e1, m1);
        System.out.println("===期初薪资===");

        System.out.println(m1.getName() + "的薪资:" + m1.getSalary() + "\t" + "|" + "银行卡余额:" + "0");
        System.out.println(e1.getName() + "的薪资:" + e1.getSalary() + "\t" + "|" + "银行卡余额:" + "0");

      System.out.println("===第一个月===");
        System.out.println(m1.getName() + "的薪资:" + m1.getSalary() + "\t" + "|" + "银行卡余额:" + m1.getBalance());
        System.out.println(e1.getName() + "的薪资:" + e1.getSalary() + "\t" + "|" + "银行卡余额:" + e1.getBalance());

        System.out.println("===第二个月===");

        System.out.println(m1.getName() + "的薪资:" + m1.getSalary() + "\t" + "|" + "银行卡余额:" + m1.getBalance());
        System.out.println(e1.getName() + "的薪资:" + e1.getSalary() + "\t" + "|" + "银行卡余额:" + e1.getBalance());

        System.out.println("===第三个月===");
        System.out.println(m1.getName() + "的薪资:" + m1.getSalary() + "\t" + "|" + "银行卡余额:" + m1.getBalance());
        System.out.println(e1.getName() + "的薪资:" + e1.getSalary() + "\t" + "|" + "银行卡余额:" + e1.getBalance());


    }
}
